package com.mapper;

import com.entity.LoginRecord;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface LoginRecordMapper {

    //保存登录记录
    @Insert("insert into login_record(employee_id,employee_name,time,ipaddress) values(#{employeeId},#{employeeName},#{time},#{ipaddress})")
    boolean insert(LoginRecord loginRecord);

    //登陆记录查询
    @Select("select * from login_record")
    List<LoginRecord> list();
}
